import 'package:cbec_app/generated/json/base/json_field.dart';
import 'package:cbec_app/generated/json/special_topic_commodity_entity.g.dart';
import 'dart:convert';
export 'package:cbec_app/generated/json/special_topic_commodity_entity.g.dart';

@JsonSerializable()
class SpecialTopicCommodityData {
  String? fileUrl = '';
  String? name = '';
  SpecialTopicCommodityDataGoodsList? goodsList;

  SpecialTopicCommodityData();

  factory SpecialTopicCommodityData.fromJson(Map<String, dynamic> json) => $SpecialTopicCommodityDataFromJson(json);

  Map<String, dynamic> toJson() => $SpecialTopicCommodityDataToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SpecialTopicCommodityDataGoodsList {
  int? total = 0;
  List<SpecialTopicCommodityDataGoodsListList>? list = [];
  int? pageNum = 0;
  int? pageSize = 0;
  int? size = 0;
  int? startRow = 0;
  int? endRow = 0;
  int? pages = 0;
  int? prePage = 0;
  int? nextPage = 0;
  bool? isFirstPage = false;
  bool? isLastPage = false;
  bool? hasPreviousPage = false;
  bool? hasNextPage = false;
  int? navigatePages = 0;
  List<int>? navigatepageNums = [];
  int? navigateFirstPage = 0;
  int? navigateLastPage = 0;

  SpecialTopicCommodityDataGoodsList();

  factory SpecialTopicCommodityDataGoodsList.fromJson(Map<String, dynamic> json) => $SpecialTopicCommodityDataGoodsListFromJson(json);

  Map<String, dynamic> toJson() => $SpecialTopicCommodityDataGoodsListToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SpecialTopicCommodityDataGoodsListList {
  String? commodityId = '';
  String? id = '';
  String? spuSpecJsonBody = '';
  String? skuCode = '';
  String? barCode = '';
  String? commodityName = '';
  int? status = 0;
  int? commodityStatus = 0;
  int? number = 0;
  int? baseSpec = 0;
  int? commodityType = 0;
  int? commoditySource = 0;
  int? commodityForm = 0;
  String? supplierName = '';
  String? firstClassID = '';
  String? secondClassID = '';
  String? classId = '';
  String? className = '';
  String? brandId = '';
  String? brandName = '';
  double? taxRate;
  double? highTaxRate;
  double? highPrice;
  double? priceCost;
  double? priceMarket;
  double? price;
  int? priceType = 0;
  List<SpecialTopicCommodityDataGoodsListListSpecList>? specList = [];
  dynamic image;
  String? mainImage = '';
  dynamic paySingle;
  List<dynamic>? discountLabel = [];
  dynamic sort;
  int? isCombination = 0;

  SpecialTopicCommodityDataGoodsListList();

  factory SpecialTopicCommodityDataGoodsListList.fromJson(Map<String, dynamic> json) => $SpecialTopicCommodityDataGoodsListListFromJson(json);

  Map<String, dynamic> toJson() => $SpecialTopicCommodityDataGoodsListListToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SpecialTopicCommodityDataGoodsListListSpecList {
  int? specNum = 0;
  double? priceCost;
  double? price;
  double? profit;
  double? highPrice;
  double? priceMarket;
  dynamic taxRate;

  SpecialTopicCommodityDataGoodsListListSpecList();

  factory SpecialTopicCommodityDataGoodsListListSpecList.fromJson(Map<String, dynamic> json) => $SpecialTopicCommodityDataGoodsListListSpecListFromJson(json);

  Map<String, dynamic> toJson() => $SpecialTopicCommodityDataGoodsListListSpecListToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
